#ifndef WORLD_H_
#define WORLD_H_
#include "singleton.h"

class sgKingdom;
class sgGeneral;
class CSerialize;
typedef std::vector<sgKingdom *> KingdomVec;
typedef std::map<int, sgGeneral*> GeneralMap;
class sgWorld:public CSingleton<sgWorld>
{
    IMPLEMENT_SINGLETON(sgWorld);
public:
    void Initialize( );
	void Update( int diff );
	KingdomVec &GetKingdoms( );
    void AddKingdom( sgKingdom *k );
    void RemoveKingdom( sgKingdom *kd );
    GeneralMap &GetGenerals( );

    void Serialize( CSerialize &s );
protected:
	KingdomVec m_kingdoms;
    GeneralMap m_generals;
};

#endif